

from PyQt5 import QtCore, QtGui, QtWidgets





class Ui_MainWindow(QtWidgets.QMainWindow):
    # def __init__(self):
    #     super().__init__()
    #     self.setupUi(self)

    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1683, 805)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        
        self.gridLayout_2 = QtWidgets.QGridLayout()
        self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
        self.gridLayout_2.setObjectName("gridLayout_2")
        



        self.graphicsView = QtWidgets.QGraphicsView(self.centralwidget)
        self.graphicsView.setGeometry(QtCore.QRect(50, 50, 681, 691))
        self.graphicsView.setObjectName("graphicsView")
        

        
        #勾选框1
        self.checkBox = QtWidgets.QCheckBox(self.centralwidget)
        self.checkBox.setGeometry(QtCore.QRect(750, 90, 91, 19))
        self.checkBox.setObjectName("checkBox")
        self.checkBox.clicked.connect(self.cb1)
        
        #勾选框2
        self.checkBox_2 = QtWidgets.QCheckBox(self.centralwidget)
        self.checkBox_2.setGeometry(QtCore.QRect(750, 210, 91, 19))
        self.checkBox_2.setObjectName("checkBox_2")
        self.checkBox_2.clicked.connect(self.cb2)
        
        #文本框1（第一行第一个）
        self.plainTextEdit = QtWidgets.QPlainTextEdit(self.centralwidget)
        self.plainTextEdit.setGeometry(QtCore.QRect(1040, 70, 221, 71))
        self.plainTextEdit.setObjectName("plainTextEdit")
        self.plainTextEdit.setEnabled(False)

        #文本框2
        self.plainTextEdit_2 = QtWidgets.QPlainTextEdit(self.centralwidget)
        self.plainTextEdit_2.setGeometry(QtCore.QRect(1040, 190, 221, 71))
        self.plainTextEdit_2.setObjectName("plainTextEdit_2")
        self.plainTextEdit_2.setEnabled(False)

        
        #文本框
        self.label = QtWidgets.QLabel(self.centralwidget)
        self.label.setGeometry(QtCore.QRect(1440, 40, 72, 15))
        self.label.setObjectName("label")
        
        #文本框3（第一行第二个）
        self.plainTextEdit_3 = QtWidgets.QPlainTextEdit(self.centralwidget)
        self.plainTextEdit_3.setGeometry(QtCore.QRect(1420, 80, 61, 51))
        self.plainTextEdit_3.setObjectName("plainTextEdit_3")
        self.plainTextEdit_3.setEnabled(False)
        
        #文本框4（第一行第三个）
        self.plainTextEdit_4 = QtWidgets.QPlainTextEdit(self.centralwidget)
        self.plainTextEdit_4.setGeometry(QtCore.QRect(1520, 80, 61, 51))
        self.plainTextEdit_4.setObjectName("plainTextEdit_4")
        self.plainTextEdit_4.setEnabled(False)
        
        
        # 第一行 ~ 框
        self.label_2 = QtWidgets.QLabel(self.centralwidget)
        self.label_2.setGeometry(QtCore.QRect(1490, 100, 72, 15))
        font = QtGui.QFont()
        font.setFamily("Agency FB")
        font.setPointSize(22)
        self.label_2.setFont(font)
        self.label_2.setObjectName("label_2")
        
        # 第二行 ~ 框
        self.label_3 = QtWidgets.QLabel(self.centralwidget)
        self.label_3.setGeometry(QtCore.QRect(1490, 220, 61, 16))
        font = QtGui.QFont()
        font.setFamily("Agency FB")
        font.setPointSize(22)
        self.label_3.setFont(font)
        self.label_3.setObjectName("label_3")
        
        #文本框5（第二行第二个）
        self.plainTextEdit_5 = QtWidgets.QPlainTextEdit(self.centralwidget)
        self.plainTextEdit_5.setGeometry(QtCore.QRect(1420, 200, 61, 51))
        self.plainTextEdit_5.setObjectName("plainTextEdit_5")
        self.plainTextEdit_5.setEnabled(False)

        
        #文本框6（第二行第三个）
        self.plainTextEdit_6 = QtWidgets.QPlainTextEdit(self.centralwidget)
        self.plainTextEdit_6.setGeometry(QtCore.QRect(1520, 200, 61, 51))
        self.plainTextEdit_6.setObjectName("plainTextEdit_6")
        self.plainTextEdit_6.setEnabled(False)

        
        #开始按钮
        self.pushButton = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton.setGeometry(QtCore.QRect(1010, 600, 151, 81))
        self.pushButton.setObjectName("pushButton")
        self.pushButton.clicked.connect(self.Paint)

        
        #文本框7（第三行第二个）
        self.plainTextEdit_7 = QtWidgets.QPlainTextEdit(self.centralwidget)
        self.plainTextEdit_7.setGeometry(QtCore.QRect(1420, 330, 61, 51))
        self.plainTextEdit_7.setObjectName("plainTextEdit_7")
        self.plainTextEdit_7.setEnabled(False)

        
        #文本框8（第三行第一个）
        self.plainTextEdit_8 = QtWidgets.QPlainTextEdit(self.centralwidget)
        self.plainTextEdit_8.setGeometry(QtCore.QRect(1040, 320, 221, 71))
        self.plainTextEdit_8.setObjectName("plainTextEdit_8")
        self.plainTextEdit_8.setEnabled(False)

        
        
        #文本框9（第三行第三个）
        self.plainTextEdit_9 = QtWidgets.QPlainTextEdit(self.centralwidget)
        self.plainTextEdit_9.setGeometry(QtCore.QRect(1520, 330, 61, 51))
        self.plainTextEdit_9.setObjectName("plainTextEdit_9")
        self.plainTextEdit_9.setEnabled(False)

        # ~ 第三行
        self.label_4 = QtWidgets.QLabel(self.centralwidget)
        self.label_4.setGeometry(QtCore.QRect(1490, 350, 61, 16))
        font = QtGui.QFont()
        font.setFamily("Agency FB")
        font.setPointSize(22)
        self.label_4.setFont(font)
        self.label_4.setObjectName("label_4")
        
        #第三行 checkbox
        self.checkBox_3 = QtWidgets.QCheckBox(self.centralwidget)
        self.checkBox_3.setGeometry(QtCore.QRect(750, 340, 91, 19))
        self.checkBox_3.setObjectName("checkBox_3")
        self.checkBox_3.clicked.connect(self.cb3)
        
        #文本框10（第四行第二个）
        self.plainTextEdit_10 = QtWidgets.QPlainTextEdit(self.centralwidget)
        self.plainTextEdit_10.setGeometry(QtCore.QRect(1420, 450, 61, 51))
        self.plainTextEdit_10.setObjectName("plainTextEdit_10")
        self.plainTextEdit_10.setEnabled(False)

        #文本框12（第四行第三个）
        self.plainTextEdit_12 = QtWidgets.QPlainTextEdit(self.centralwidget)
        self.plainTextEdit_12.setGeometry(QtCore.QRect(1520, 450, 61, 51))
        self.plainTextEdit_12.setObjectName("plainTextEdit_12")
        self.plainTextEdit_12.setEnabled(False)

        #文本框11（第四行第一个）
        self.plainTextEdit_11 = QtWidgets.QPlainTextEdit(self.centralwidget)
        self.plainTextEdit_11.setGeometry(QtCore.QRect(1040, 440, 221, 71))
        self.plainTextEdit_11.setObjectName("plainTextEdit_11")
        self.plainTextEdit_11.setEnabled(False)

        #第四行 ~
        self.label_5 = QtWidgets.QLabel(self.centralwidget)
        self.label_5.setGeometry(QtCore.QRect(1490, 470, 61, 16))
        font = QtGui.QFont()
        font.setFamily("Agency FB")
        font.setPointSize(22)
        self.label_5.setFont(font)
        self.label_5.setObjectName("label_5")
        
        #第四行 checkbox
        self.checkBox_4 = QtWidgets.QCheckBox(self.centralwidget)
        self.checkBox_4.setGeometry(QtCore.QRect(750, 460, 91, 19))
        self.checkBox_4.setObjectName("checkBox_4")
        self.checkBox_4.clicked.connect(self.cb4)
        
        #清屏按钮
        self.pushButton_2 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_2.setGeometry(QtCore.QRect(1310, 600, 151, 81))
        self.pushButton_2.setObjectName("pushButton_2")
        self.pushButton_2.clicked.connect(self.ClickClear)
        
        
        self.comboBox = QtWidgets.QComboBox(self.centralwidget)
        self.comboBox.setGeometry(QtCore.QRect(850, 90, 87, 22))
        self.comboBox.setObjectName("comboBox")
        self.comboBox.addItem("")
        self.comboBox.setItemText(0, "")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        
        self.comboBox_2 = QtWidgets.QComboBox(self.centralwidget)
        self.comboBox_2.setGeometry(QtCore.QRect(850, 210, 90, 21))
        self.comboBox_2.setObjectName("comboBox_2")
        self.comboBox_2.addItem("")
        self.comboBox_2.setItemText(0, "")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")

        
        self.comboBox_3 = QtWidgets.QComboBox(self.centralwidget)
        self.comboBox_3.setGeometry(QtCore.QRect(850, 340, 87, 22))
        self.comboBox_3.setObjectName("comboBox_3")
        self.comboBox_3.addItem("")
        self.comboBox_3.setItemText(0, "")
        self.comboBox_3.addItem("")
        self.comboBox_3.addItem("")
        self.comboBox_3.addItem("")
        self.comboBox_3.addItem("")
        self.comboBox_3.addItem("")

        
        self.comboBox_4 = QtWidgets.QComboBox(self.centralwidget)
        self.comboBox_4.setGeometry(QtCore.QRect(850, 460, 87, 22))
        self.comboBox_4.setObjectName("comboBox_4")
        self.comboBox_4.addItem("")
        self.comboBox_4.setItemText(0, "")
        self.comboBox_4.addItem("")
        self.comboBox_4.addItem("")
        self.comboBox_4.addItem("")
        self.comboBox_4.addItem("")
        self.comboBox_4.addItem("")

        
        self.label_6 = QtWidgets.QLabel(self.centralwidget)
        self.label_6.setGeometry(QtCore.QRect(1320, 30, 72, 15))
        self.label_6.setObjectName("label_6")
        
        
        self.comboBox_5 = QtWidgets.QComboBox(self.centralwidget)
        self.comboBox_5.setGeometry(QtCore.QRect(1310, 80, 60,60))
        self.comboBox_5.setObjectName("comboBox_5")
        self.comboBox_5.addItem("")
        self.comboBox_5.setItemText(0, "")
        self.comboBox_5.addItem("")
        self.comboBox_5.addItem("")
        self.comboBox_5.addItem("")
        self.comboBox_5.addItem("")

        
        self.comboBox_6 = QtWidgets.QComboBox(self.centralwidget)
        self.comboBox_6.setGeometry(QtCore.QRect(1310, 200, 60, 60))
        self.comboBox_6.setObjectName("comboBox_5")
        self.comboBox_6.addItem("")
        self.comboBox_6.setItemText(0, "")
        self.comboBox_6.addItem("")
        self.comboBox_6.addItem("")
        self.comboBox_6.addItem("")
        self.comboBox_6.addItem("")

        
        self.comboBox_7 = QtWidgets.QComboBox(self.centralwidget)
        self.comboBox_7.setGeometry(QtCore.QRect(1310, 330, 60,60))
        self.comboBox_7.setObjectName("comboBox_5")
        self.comboBox_7.addItem("")
        self.comboBox_7.setItemText(0, "")
        self.comboBox_7.addItem("")
        self.comboBox_7.addItem("")
        self.comboBox_7.addItem("")
        self.comboBox_7.addItem("")

        
        self.comboBox_8 = QtWidgets.QComboBox(self.centralwidget)
        self.comboBox_8.setGeometry(QtCore.QRect(1310, 450, 60,60))
        self.comboBox_8.setObjectName("comboBox_5")
        self.comboBox_8.addItem("")
        self.comboBox_8.setItemText(0, "")
        self.comboBox_8.addItem("")
        self.comboBox_8.addItem("")
        self.comboBox_8.addItem("")
        self.comboBox_8.addItem("")
        
        # self.toolButton = QtWidgets.QToolButton(self.centralwidget)
        # self.toolButton.setGeometry(QtCore.QRect(1310, 80, 47, 41))
        # self.toolButton.setObjectName("toolButton")
        # self.toolButton.setAutoRaise(True)
        # # # self.toolButton.setArrowType(Qt.UpArrow)
        # menu=QMenu()
        # sub_menu = QMenu(menu)
        # sub_menu.setTitle("颜色")
        # menu.addMenu(sub_menu)
        # self.toolButton.setMenu(menu)
        # self.toolButton.setPopupMode(QToolButton.MenuButtonPopup)
        # act0 = QAction("红色",sub_menu)
        # act1 = QAction("蓝色",sub_menu)
        # act2 = QAction("绿色",sub_menu)
        # act3 = QAction("紫色",sub_menu)
        


        # menu.addActions([act0,act1,
        #                  act2,act3])
        
            
        # self.toolButton_2 = QtWidgets.QToolButton(self.centralwidget)
        # self.toolButton_2.setGeometry(QtCore.QRect(1310, 200, 47, 41))
        # self.toolButton_2.setObjectName("toolButton_2")
        
        # self.toolButton_3 = QtWidgets.QToolButton(self.centralwidget)
        # self.toolButton_3.setGeometry(QtCore.QRect(1310, 330, 47, 41))
        # self.toolButton_3.setObjectName("toolButton_3")
        
        # self.toolButton_4 = QtWidgets.QToolButton(self.centralwidget)
        # self.toolButton_4.setGeometry(QtCore.QRect(1310, 450, 47, 41))
        # self.toolButton_4.setObjectName("toolButton_4")
        
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1683, 26))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
        self.checkBox.setText(_translate("MainWindow", "Func1"))
        self.checkBox_2.setText(_translate("MainWindow", "Func2"))
        self.label.setText(_translate("MainWindow", "X取值范围"))
        self.label_2.setText(_translate("MainWindow", "~"))
        self.label_3.setText(_translate("MainWindow", "~"))
        self.pushButton.setText(_translate("MainWindow", "开始"))
        self.label_4.setText(_translate("MainWindow", "~"))
        self.checkBox_3.setText(_translate("MainWindow", "Func3"))
        self.label_5.setText(_translate("MainWindow", "~"))
        self.checkBox_4.setText(_translate("MainWindow", "Func4"))
        self.pushButton_2.setText(_translate("MainWindow", "清屏"))
        self.comboBox.setItemText(1, _translate("MainWindow", "三角函数"))
        self.comboBox.setItemText(2, _translate("MainWindow", "幂函数"))
        self.comboBox.setItemText(3, _translate("MainWindow", "圆"))
        self.comboBox.setItemText(4, _translate("MainWindow", "双曲线"))
        self.comboBox.setItemText(5, _translate("MainWindow", "椭圆"))


        self.comboBox_2.setItemText(1, _translate("MainWindow", "三角函数"))
        self.comboBox_2.setItemText(2, _translate("MainWindow", "幂函数"))
        self.comboBox_2.setItemText(3, _translate("MainWindow", "圆"))
        self.comboBox_2.setItemText(4, _translate("MainWindow", "双曲线"))
        self.comboBox_2.setItemText(5, _translate("MainWindow", "椭圆"))

        self.comboBox_3.setItemText(1, _translate("MainWindow", "三角函数"))
        self.comboBox_3.setItemText(2, _translate("MainWindow", "幂函数"))
        self.comboBox_3.setItemText(3, _translate("MainWindow", "圆"))
        self.comboBox_3.setItemText(4, _translate("MainWindow", "双曲线"))
        self.comboBox_3.setItemText(5, _translate("MainWindow", "椭圆"))

        
        self.comboBox_4.setItemText(1, _translate("MainWindow", "三角函数"))
        self.comboBox_4.setItemText(2, _translate("MainWindow", "幂函数"))
        self.comboBox_4.setItemText(3, _translate("MainWindow", "圆"))
        self.comboBox_4.setItemText(4, _translate("MainWindow", "双曲线"))
        self.comboBox_4.setItemText(5, _translate("MainWindow", "椭圆"))

        
        self.comboBox_5.setItemText(1,_translate("MainWindow", "红色"))
        self.comboBox_5.setItemText(2,_translate("MainWindow", "蓝色"))
        self.comboBox_5.setItemText(3,_translate("MainWindow", "绿色"))
        self.comboBox_5.setItemText(4,_translate("MainWindow", "紫色"))
        
        self.comboBox_6.setItemText(1,_translate("MainWindow", "红色"))
        self.comboBox_6.setItemText(2,_translate("MainWindow", "蓝色"))
        self.comboBox_6.setItemText(3,_translate("MainWindow", "绿色"))
        self.comboBox_6.setItemText(4,_translate("MainWindow", "紫色"))
        
        self.comboBox_7.setItemText(1,_translate("MainWindow", "红色"))
        self.comboBox_7.setItemText(2,_translate("MainWindow", "蓝色"))
        self.comboBox_7.setItemText(3,_translate("MainWindow", "绿色"))
        self.comboBox_7.setItemText(4,_translate("MainWindow", "紫色"))
        
        self.comboBox_8.setItemText(1,_translate("MainWindow", "红色"))
        self.comboBox_8.setItemText(2,_translate("MainWindow", "蓝色"))
        self.comboBox_8.setItemText(3,_translate("MainWindow", "绿色"))
        self.comboBox_8.setItemText(4,_translate("MainWindow", "紫色"))

        self.label_6.setText(_translate("MainWindow", "颜色"))
